Skip to content

build(deps): bump giithub.com/GaijinEntertainment/go-exhaustruct from v3.3.1 to 4.0.0 #5984

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

xobotyi
Copy link
Contributor

@xobotyi xobotyi commented Aug 9, 2025

  • analyzer package is now distributed via vanity import as dev.gaijin.team/go/exhaustruct/v4.
  • version introduced new features which, in turn, required usage of structure as configuration causing major version bump.
  • updated documentation on config fields to be more obvious.

GaijinEntertainment/go-exhaustruct@v3.3.1...v4.0.0

For golangci-lint users nothing changes, except 4 new fields added, so no deprecations or migration on the users side is required.
Major bump of exhaustruct caused mostly because of package rename and the way config being passed to the linter.

note: go mod tidy touched more packages than i've expected

@CLAassistant
Copy link

CLAassistant commented Aug 9, 2025

CLA assistant check
All committers have signed the CLA.

@ldez ldez self-requested a review August 9, 2025 12:28
@ldez ldez added the linter: update version Update version of linter label Aug 9, 2025
@ldez
Copy link
Member

ldez commented Aug 9, 2025

This PR is based on golangci-lint v1 (the branch master).

The PR must target the branch main (golangci-lint v2).

The way to manage major (breaking) versions of linters has changed:

@ldez ldez added the feedback required Requires additional feedback label Aug 9, 2025
@xobotyi
Copy link
Contributor Author

xobotyi commented Aug 9, 2025

For golangci-lint users configuration itself still the same, just extra fields added and functionally without enabling new fields linter still acts the same.

Updated description regarding that.

@ldez
Copy link
Member

ldez commented Aug 9, 2025

ok, if there are no breaking changes, you don't need to use the new approach.

@xobotyi
Copy link
Contributor Author

xobotyi commented Aug 9, 2025

dang it! i see the issue now, the branch is wrong..

@xobotyi xobotyi force-pushed the exhaustruct-v4 branch 2 times, most recently from 74919d7 to 016b734 Compare August 9, 2025 13:38
- analyzer package is now distributed via vanity import as
  `dev.gaijin.team/go/exhaustruct/v4`.
- version introduced new features which, in turn, required usage
  of structure as configuration causing major version bump.
@xobotyi
Copy link
Contributor Author

xobotyi commented Aug 9, 2025

ready for review
note that this pr requires bumping go.mod go version to 1.24

@ldez
Copy link
Member

ldez commented Aug 9, 2025

You must downgrade your min go version inside your linter.

@ldez ldez changed the title feat: upgrade exhaustruct to v4 exhaustruct: upgrade to v4 Aug 9, 2025
@ldez ldez changed the title exhaustruct: upgrade to v4 build(deps): bump giithub.com/GaijinEntertainment/go-exhaustruct/r from v3.3.1 to 4.0.0 Aug 9, 2025
@xobotyi
Copy link
Contributor Author

xobotyi commented Aug 9, 2025

Welp, it is transitory.
Package we use is 1.24, and therefore linter is also.
IIRC golangci-lint targets oldstable, so it can be safely transitioned whenever 1.25 version support lands.

@ldez
Copy link
Member

ldez commented Aug 9, 2025

Your linter doesn't need go1.24: the module dev.gaijin.team/go/golib must downgrade the min Go version.

@ldez
Copy link
Member

ldez commented Aug 9, 2025

The min Go version is about the language (the syntax), a library should not enforce the latest stable version of Go unless it uses language-specific syntax related to this version.

In all cases, a library should not do that.

GaijinEntertainment/golib#1

- '.*/http\.Cookie'
# Allows empty structures in return statements.
# Default: false
allow-empty-returns: false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
allow-empty-returns: false
allow-empty-returns: true

allow-empty-returns: false
# Allows empty structures in variable declarations.
# Default: false
allow-empty-declarations: false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
allow-empty-declarations: false
allow-empty-declarations: true

Comment on lines +505 to +511
# List of regular expressions to match type names that should be
# processed. Anonymous structs can be matched by '<anonymous>' alias.
#
# Each regular expression must match the full type name, including package path.
# For example, to match type `net/http.Cookie` regular expression should be
# `.*/http\.Cookie`, but not `http\.Cookie`.
#
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# List of regular expressions to match type names that should be
# processed. Anonymous structs can be matched by '<anonymous>' alias.
#
# Each regular expression must match the full type name, including package path.
# For example, to match type `net/http.Cookie` regular expression should be
# `.*/http\.Cookie`, but not `http\.Cookie`.
#
# List of regular expressions to match type names that should be processed.
# Anonymous structs can be matched by '<anonymous>' alias.
#
# Each regular expression must match the full type name, including package path.
# For example, to match type `net/http.Cookie` regular expression should be `.*/http\.Cookie`,
# but not `http\.Cookie`.

Comment on lines +516 to +522
# List of regular expressions to match type names that should be
# excluded from processing. Anonymous structs can be matched by '<anonymous>'
# alias.
# Has precedence over IncludeRx.
# Each regular expression must match the full type name, including package path.
# For example, to match type `net/http.Cookie` regular expression should be
# `.*/http\.Cookie`, but not `http\.Cookie`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# List of regular expressions to match type names that should be
# excluded from processing. Anonymous structs can be matched by '<anonymous>'
# alias.
# Has precedence over IncludeRx.
# Each regular expression must match the full type name, including package path.
# For example, to match type `net/http.Cookie` regular expression should be
# `.*/http\.Cookie`, but not `http\.Cookie`.
# List of regular expressions to match type names that should be
# excluded from processing.
# Anonymous structs can be matched by '<anonymous>' alias.
# Has precedence over `include`.
# Each regular expression must match the full type name, including package path.
# For example, to match type `net/http.Cookie` regular expression should be `.*/http\.Cookie`,
# but not `http\.Cookie`.

Comment on lines +529 to +535
# List of regular expressions to match type names that should be
# allowed to be empty. Anonymous structs can be matched by '<anonymous>'
# alias.
# Each regular expression must match the full type name, including package path.
# For example, to match type `net/http.Cookie` regular expression should be
# `.*/http\.Cookie`, but not `http\.Cookie`.
# Default: []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# List of regular expressions to match type names that should be
# allowed to be empty. Anonymous structs can be matched by '<anonymous>'
# alias.
# Each regular expression must match the full type name, including package path.
# For example, to match type `net/http.Cookie` regular expression should be
# `.*/http\.Cookie`, but not `http\.Cookie`.
# Default: []
# List of regular expressions to match type names that should be allowed to be empty.
# Anonymous structs can be matched by '<anonymous>' alias.
# Each regular expression must match the full type name, including package path.
# For example, to match type `net/http.Cookie` regular expression should be `.*/http\.Cookie`,
# but not `http\.Cookie`.
# Default: []

Comment on lines +3 to +5
go 1.24

toolchain go1.24.6
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
go 1.24
toolchain go1.24.6
go 1.23.0

@xobotyi
Copy link
Contributor Author

xobotyi commented Aug 9, 2025

Linter itself will become dependant on 1.24 next minor release, because of usage of iterators on go types.

golib will also receive direct dependencies to features added in 1.24
there are features requiring these versions, just changes itself are not landed yet..

@ldez
Copy link
Member

ldez commented Aug 9, 2025

OK so I will not do more review or merge your PR until go1.25

@ldez ldez marked this pull request as draft August 9, 2025 15:01
@ldez ldez added the blocked Need's direct action from maintainer label Aug 9, 2025
@xobotyi
Copy link
Contributor Author

xobotyi commented Aug 9, 2025

No problems, I've expected that =)

@ldez ldez changed the title build(deps): bump giithub.com/GaijinEntertainment/go-exhaustruct/r from v3.3.1 to 4.0.0 build(deps): bump giithub.com/GaijinEntertainment/go-exhaustruct from v3.3.1 to 4.0.0 Aug 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Need's direct action from maintainer feedback required Requires additional feedback linter: update version Update version of linter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants